//
//  OrderListFootView.swift
//  OnceNectar
//
//  Created by 吴凌 on 2018/7/31.
//  Copyright © 2018年 com.inwhoop. All rights reserved.
//

import UIKit
protocol OrderListFootViewDelegate: NSObjectProtocol {
    func btn1Click(model:myOrderModel)
    func btn2Click(model:myOrderModel)
}
class OrderListFootView: UITableViewHeaderFooterView {

    @IBOutlet weak var num: UILabel!
    @IBOutlet weak var amount: UILabel!
    @IBOutlet weak var btn1: UIButton!
    @IBOutlet weak var btn2: UIButton!
    var model:myOrderModel?
    weak var delegate: OrderListFootViewDelegate?
    override func awakeFromNib() {
        super.awakeFromNib()
        btn1.layer.cornerRadius = btn1.height / 2
        btn1.layer.borderColor = UIColor(hex: 0xAAAAAA).cgColor
        btn1.layer.borderWidth = 1
        
        btn2.layer.cornerRadius = btn2.height / 2
        btn2.layer.borderColor = UIColor(hex: 0xAAAAAA).cgColor
        btn2.layer.borderWidth = 1
    }
    
    @IBAction func btn1Click(_ sender: Any) {
        self.delegate?.btn1Click(model:self.model!)
    }
    @IBAction func btn2Click(_ sender: Any) {
        self.delegate?.btn2Click(model:self.model!)
    }

}
